package com.qdxwx.data.service.manager;

import com.qdxwx.common.exception.BusinessException;
import com.qdxwx.common.page.PageRequest;
import com.qdxwx.models.manager.Role;
import com.qdxwx.models.manager.ManagerRole;

import java.util.List;
import java.util.Set;

/**
 * 角色业务层
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
public interface RoleService
{
    List<Role> getList(Role role, PageRequest page);

    int count(Role role);

    Set<String> getKeys(int managerId);

    Role get(Integer roleId);

    int deleteByIds(String ids) throws BusinessException;

    int insert(Role role);

    int update(Role role);

    boolean checkRoleName(String roleName);

    boolean checkRoleKey(String roleKey);

    void checkRoleAllowed(Role role);

    int countUserRoleByRoleId(Integer roleId);

    int updateStatus(Role role);

    int deleteAuthManager(ManagerRole managerRole);

    int deleteAuthManagers(Integer roleId, Integer[] managerIds);

    int insertAuthManagers(Integer roleId, Integer[] managerIds);


}
